<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>四柱八字排盘</title>
    <style>
        body {font-family: sans-serif; padding: 20px;background:#f5f5f5;}
        .form-group {margin-bottom: 15px;}
        input[type="number"] {width: 100%;padding: 10px;border: 1px solid #ccc;border-radius: 4px;}
        button {padding: 10px 20px;background:#007bff;color:white;border:none;border-radius:4px;cursor:pointer;}
        #result {margin-top: 20px;padding: 15px;background:white;border:1px solid #ddd;min-height: 100px;}
    </style>
</head>
<body>
<h2>请输入生辰信息</h2>
<div class="form-group">
    <label>年份：</label>
    <input type="number" id="year" placeholder="如 1990">
</div>
<div class="form-group">
    <label>月份：</label>
    <input type="number" id="month" placeholder="1~12">
</div>
<div class="form-group">
    <label>日子：</label>
    <input type="number" id="day" placeholder="1~31">
</div>
<div class="form-group">
    <label>时辰：</label>
    <input type="number" id="hour" placeholder="0~23">
</div>
<button onclick ="calculate()">排盘</button>
<div id="result"></div>

<script>
    function calculate() {
        const year = document.getElementById('year').value;
        const month = document.getElementById('month').value;
        const day = document.getElementById('day').value;
        const hour = document.getElementById('hour').value;

        if (!year || !month || !day || !hour) {
            alert('请输入完整信息');
            return;
        }

        // 调Android方法
        window.bazi.openBaziActivity();
    }
</script>
</body>
</html>
